package com.bjpowernode.spring6.staticproxy.service.impl;

import com.bjpowernode.spring6.staticproxy.service.UserServiceSta;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service("userServiceStaImplProxy")
public class UserServiceStaImplProxy implements UserServiceSta {


    private UserServiceSta userServiceSta;

//    public UserServiceStaImplProxy() {
//    }

    @Autowired
    public UserServiceStaImplProxy(UserServiceSta userServiceSta) {
        this.userServiceSta = userServiceSta;
    }

    @Override
    public int save(int id) {
        System.out.println("代理类增强");
        int count = userServiceSta.save(2);
        return count;
    }
}
